#ifndef ___METHOD_H___
#define ___METHOD_H___

//需要包含的头文件
#include "stm32f10x.h"
#include "Motor.h"
#include "usart.h"
#include "Command.h"
#include "delay.h"
#include "flash.h"
#include "Config.h"
#include "LY68L6400.h"
#include "SPI.h"
#include "dma.h"
#include "DialSW.h"
#include "package.h"
#include "Err.h"
#include "time.h"
#include "JetPwr.h"
#include "MachineProperty.h"


extern uint8_t XM_CompenseValue[2];//X轴的行间距
extern uint8_t YM_CompenseValue[6];//Y轴的行间距

//超时时间判断
#define OVER_TIME                                   900                 //100ms计数一次 10s超时

/************************打印测试宏定义******************************/
//设置打印中心
#define ModifCenter(x,y)			            (DRAWING_ModifCenter(x,y))
//打印驱动 使用HP6578的驱动
#define PrintDriver(x,y)			            (DRAWING_PrintDriver(x,y))			
//打印测试 使用彩色机的打印测试驱动
#define PrintTestDriver()			    (DRAWING_PrintTestDriver())
//计算图片大小
#define MatchTheSizeOfPicture(x,y)	            (DRAWING_MatchTheSizeOfPicture(x,y))
//设置加热次数
//#define ModifHeatProperty(longcnt,shortcnt)
//墨盒老化测试
#define MachineBurnIn()                             (DRAWING_MachineBurnIn())
//增加的方法
#define METHOD_n                                     DRAWING_METHOD_n 
//增加的方法函数 传入的是参数地址
#define DEFINE_Method_n(Pparameter)                 (DRAWING_DEFINE_Method_n(Pparameter))

//输出到cmd tab的method函数声明
extern void METHOD_ResetMachine(uint32_t ,uint16_t);					//机器复位
extern void METHOD_ZMotorRaise(uint32_t ,uint16_t);						//Z轴上升
extern void METHOD_OpenLaser(uint32_t ,uint16_t);
extern void METHOD_CloseLaser(uint32_t ,uint16_t);
extern void METHOD_SendVersion(uint32_t ,uint16_t);
extern void METHOD_UpdateVersion(uint32_t ,uint16_t);
extern void METHOD_SendID(uint32_t ,uint16_t);
extern void METHOD_SaveID(uint32_t parameter,uint16_t size);
extern void METHOD_UpdateID(uint32_t paramter,uint16_t size);
extern void METHOD_SendScreen(uint32_t ,uint16_t);
extern void METHOD_SaveScreen(uint32_t parameter,uint16_t size);
extern void METHOD_UpdateScreen(uint32_t paramter,uint16_t size);
extern void METHOD_SetupMachineProperty(uint32_t parameter,uint16_t size);
extern void METHOD_LockInk(uint32_t parameter,uint16_t size);
extern void METHOD_UnlockInk(uint32_t parameter,uint16_t size);
extern void METHOD_InkMoveToDot(uint32_t parameter,uint16_t size);
extern void METHOD_ModifMotorOffset(uint32_t parameter,uint16_t size);
extern void METHOD_GetPCBVersion(uint32_t parameter,uint16_t size);
extern void METHOD_PrintTest(uint32_t parameter,uint16_t size);
extern void METHOD_PrintPicture(uint32_t parameter,uint16_t size);
extern void METHOD_RequestMachineInfo(uint32_t parameter,uint16_t size);
extern void METHOD_SendtMachineInfo(uint32_t parameter,uint16_t size);
extern void METHOD_PrintStart(uint32_t parameter,uint16_t size);
extern void METHOD_MachineBurnIn(uint32_t parameter,uint16_t size);
extern void METHOD_ConfigProperty(uint32_t parameter,uint16_t size);
extern void METHOD_ConfigCompensation(uint32_t parameter,uint16_t size);
extern void METHOD_AcquireCompensation(uint32_t parameter,uint16_t size);
extern void METHOD_PrintTestCompensation(uint32_t parameter,uint16_t size);
#endif
